from rest_framework import serializers
from .models import Film
from cinema.serializers import CinemaListSerializer


class FilmSerializer(serializers.ModelSerializer):
    """影票序列化器"""

    class Meta:
        model = Film
        fields = '__all__'


class FilmListSerializer(serializers.ModelSerializer):
    """影票列表序列化器"""

    class Meta:
        model = Film
        fields = [
            'id', 'name', 'poster', 'grade', 'actors', 'nation',
            'runtime', 'category', 'filmType', 'synopsis',
            'recommend', 'photos'
        ]
